(0) Obligation:

The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(1, n^1).


The TRS R consists of the following rules:

le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
pred(s(x)) → x
minus(x, 0) → x
minus(x, s(y)) → pred(minus(x, y))
gcd(0, y) → y
gcd(s(x), 0) → s(x)
gcd(s(x), s(y)) → if_gcd(le(y, x), s(x), s(y))
if_gcd(true, s(x), s(y)) → gcd(minus(x, y), s(y))
if_gcd(false, s(x), s(y)) → gcd(minus(y, x), s(x))

Rewrite Strategy: INNERMOST

(1) TrsToWeightedTrsProof (BOTH BOUNDS(ID, ID) transformation)

Transformed TRS to weighted TRS

(2) Obligation:

The Runtime Complexity (innermost) of the given CpxWeightedTrs could be proven to be BOUNDS(1, n^1).


The TRS R consists of the following rules:

le(0, y) → true [1]
le(s(x), 0) → false [1]
le(s(x), s(y)) → le(x, y) [1]
pred(s(x)) → x [1]
minus(x, 0) → x [1]
minus(x, s(y)) → pred(minus(x, y)) [1]
gcd(0, y) → y [1]
gcd(s(x), 0) → s(x) [1]
gcd(s(x), s(y)) → if_gcd(le(y, x), s(x), s(y)) [1]
if_gcd(true, s(x), s(y)) → gcd(minus(x, y), s(y)) [1]
if_gcd(false, s(x), s(y)) → gcd(minus(y, x), s(x)) [1]

Rewrite Strategy: INNERMOST

(3) TypeInferenceProof (BOTH BOUNDS(ID, ID) transformation)

Infered types.

(4) Obligation:

Runtime Complexity Weighted TRS with Types.
The TRS R consists of the following rules:

le(0, y) → true [1]
le(s(x), 0) → false [1]
le(s(x), s(y)) → le(x, y) [1]
pred(s(x)) → x [1]
minus(x, 0) → x [1]
minus(x, s(y)) → pred(minus(x, y)) [1]
gcd(0, y) → y [1]
gcd(s(x), 0) → s(x) [1]
gcd(s(x), s(y)) → if_gcd(le(y, x), s(x), s(y)) [1]
if_gcd(true, s(x), s(y)) → gcd(minus(x, y), s(y)) [1]
if_gcd(false, s(x), s(y)) → gcd(minus(y, x), s(x)) [1]

The TRS has the following type information:
le :: 0:s → 0:s → true:false
0 :: 0:s
true :: true:false
s :: 0:s → 0:s
false :: true:false
pred :: 0:s → 0:s
minus :: 0:s → 0:s → 0:s
gcd :: 0:s → 0:s → 0:s
if_gcd :: true:false → 0:s → 0:s → 0:s

Rewrite Strategy: INNERMOST

(5) CompletionProof (UPPER BOUND(ID) transformation)

The TRS is a completely defined constructor system, as every type has a constant constructor and the following rules were added:

pred(v0) → null_pred [0]
if_gcd(v0, v1, v2) → null_if_gcd [0]
le(v0, v1) → null_le [0]
minus(v0, v1) → null_minus [0]
gcd(v0, v1) → null_gcd [0]

And the following fresh constants:

null_pred, null_if_gcd, null_le, null_minus, null_gcd

(6) Obligation:

Runtime Complexity Weighted TRS where all functions are completely defined. The underlying TRS is:

Runtime Complexity Weighted TRS with Types.
The TRS R consists of the following rules:

le(0, y) → true [1]
le(s(x), 0) → false [1]
le(s(x), s(y)) → le(x, y) [1]
pred(s(x)) → x [1]
minus(x, 0) → x [1]
minus(x, s(y)) → pred(minus(x, y)) [1]
gcd(0, y) → y [1]
gcd(s(x), 0) → s(x) [1]
gcd(s(x), s(y)) → if_gcd(le(y, x), s(x), s(y)) [1]
if_gcd(true, s(x), s(y)) → gcd(minus(x, y), s(y)) [1]
if_gcd(false, s(x), s(y)) → gcd(minus(y, x), s(x)) [1]
pred(v0) → null_pred [0]
if_gcd(v0, v1, v2) → null_if_gcd [0]
le(v0, v1) → null_le [0]
minus(v0, v1) → null_minus [0]
gcd(v0, v1) → null_gcd [0]

The TRS has the following type information:
le :: 0:s:null_pred:null_if_gcd:null_minus:null_gcd → 0:s:null_pred:null_if_gcd:null_minus:null_gcd → true:false:null_le
0 :: 0:s:null_pred:null_if_gcd:null_minus:null_gcd
true :: true:false:null_le
s :: 0:s:null_pred:null_if_gcd:null_minus:null_gcd → 0:s:null_pred:null_if_gcd:null_minus:null_gcd
false :: true:false:null_le
pred :: 0:s:null_pred:null_if_gcd:null_minus:null_gcd → 0:s:null_pred:null_if_gcd:null_minus:null_gcd
minus :: 0:s:null_pred:null_if_gcd:null_minus:null_gcd → 0:s:null_pred:null_if_gcd:null_minus:null_gcd → 0:s:null_pred:null_if_gcd:null_minus:null_gcd
gcd :: 0:s:null_pred:null_if_gcd:null_minus:null_gcd → 0:s:null_pred:null_if_gcd:null_minus:null_gcd → 0:s:null_pred:null_if_gcd:null_minus:null_gcd
if_gcd :: true:false:null_le → 0:s:null_pred:null_if_gcd:null_minus:null_gcd → 0:s:null_pred:null_if_gcd:null_minus:null_gcd → 0:s:null_pred:null_if_gcd:null_minus:null_gcd
null_pred :: 0:s:null_pred:null_if_gcd:null_minus:null_gcd
null_if_gcd :: 0:s:null_pred:null_if_gcd:null_minus:null_gcd
null_le :: true:false:null_le
null_minus :: 0:s:null_pred:null_if_gcd:null_minus:null_gcd
null_gcd :: 0:s:null_pred:null_if_gcd:null_minus:null_gcd

Rewrite Strategy: INNERMOST

(7) CpxTypedWeightedTrsToRntsProof (UPPER BOUND(ID) transformation)

Transformed the TRS into an over-approximating RNTS by (improved) Size Abstraction.
The constant constructors are abstracted as follows:

0 => 0
true => 2
false => 1
null_pred => 0
null_if_gcd => 0
null_le => 0
null_minus => 0
null_gcd => 0

(8) Obligation:

Complexity RNTS consisting of the following rules:

gcd(z, z') -{ 1 }→ y :|: y >= 0, z = 0, z' = y
gcd(z, z') -{ 1 }→ if_gcd(le(y, x), 1 + x, 1 + y) :|: z' = 1 + y, x >= 0, y >= 0, z = 1 + x
gcd(z, z') -{ 0 }→ 0 :|: v0 >= 0, v1 >= 0, z = v0, z' = v1
gcd(z, z') -{ 1 }→ 1 + x :|: x >= 0, z = 1 + x, z' = 0
if_gcd(z, z', z'') -{ 1 }→ gcd(minus(x, y), 1 + y) :|: z = 2, z' = 1 + x, x >= 0, y >= 0, z'' = 1 + y
if_gcd(z, z', z'') -{ 1 }→ gcd(minus(y, x), 1 + x) :|: z' = 1 + x, z = 1, x >= 0, y >= 0, z'' = 1 + y
if_gcd(z, z', z'') -{ 0 }→ 0 :|: v0 >= 0, z'' = v2, v1 >= 0, z = v0, z' = v1, v2 >= 0
le(z, z') -{ 1 }→ le(x, y) :|: z' = 1 + y, x >= 0, y >= 0, z = 1 + x
le(z, z') -{ 1 }→ 2 :|: y >= 0, z = 0, z' = y
le(z, z') -{ 1 }→ 1 :|: x >= 0, z = 1 + x, z' = 0
le(z, z') -{ 0 }→ 0 :|: v0 >= 0, v1 >= 0, z = v0, z' = v1
minus(z, z') -{ 1 }→ x :|: x >= 0, z = x, z' = 0
minus(z, z') -{ 1 }→ pred(minus(x, y)) :|: z' = 1 + y, x >= 0, y >= 0, z = x
minus(z, z') -{ 0 }→ 0 :|: v0 >= 0, v1 >= 0, z = v0, z' = v1
pred(z) -{ 1 }→ x :|: x >= 0, z = 1 + x
pred(z) -{ 0 }→ 0 :|: v0 >= 0, z = v0

Only complete derivations are relevant for the runtime complexity.

(9) CompleteCoflocoProof (EQUIVALENT transformation)

Transformed the RNTS (where only complete derivations are relevant) into cost relations for CoFloCo:

eq(start(V, V1, V14),0,[le(V, V1, Out)],[V >= 0,V1 >= 0]).
eq(start(V, V1, V14),0,[pred(V, Out)],[V >= 0]).
eq(start(V, V1, V14),0,[minus(V, V1, Out)],[V >= 0,V1 >= 0]).
eq(start(V, V1, V14),0,[gcd(V, V1, Out)],[V >= 0,V1 >= 0]).
eq(start(V, V1, V14),0,[fun(V, V1, V14, Out)],[V >= 0,V1 >= 0,V14 >= 0]).
eq(le(V, V1, Out),1,[],[Out = 2,V2 >= 0,V = 0,V1 = V2]).
eq(le(V, V1, Out),1,[],[Out = 1,V3 >= 0,V = 1 + V3,V1 = 0]).
eq(le(V, V1, Out),1,[le(V4, V5, Ret)],[Out = Ret,V1 = 1 + V5,V4 >= 0,V5 >= 0,V = 1 + V4]).
eq(pred(V, Out),1,[],[Out = V6,V6 >= 0,V = 1 + V6]).
eq(minus(V, V1, Out),1,[],[Out = V7,V7 >= 0,V = V7,V1 = 0]).
eq(minus(V, V1, Out),1,[minus(V8, V9, Ret0),pred(Ret0, Ret1)],[Out = Ret1,V1 = 1 + V9,V8 >= 0,V9 >= 0,V = V8]).
eq(gcd(V, V1, Out),1,[],[Out = V10,V10 >= 0,V = 0,V1 = V10]).
eq(gcd(V, V1, Out),1,[],[Out = 1 + V11,V11 >= 0,V = 1 + V11,V1 = 0]).
eq(gcd(V, V1, Out),1,[le(V12, V13, Ret01),fun(Ret01, 1 + V13, 1 + V12, Ret2)],[Out = Ret2,V1 = 1 + V12,V13 >= 0,V12 >= 0,V = 1 + V13]).
eq(fun(V, V1, V14, Out),1,[minus(V15, V16, Ret02),gcd(Ret02, 1 + V16, Ret3)],[Out = Ret3,V = 2,V1 = 1 + V15,V15 >= 0,V16 >= 0,V14 = 1 + V16]).
eq(fun(V, V1, V14, Out),1,[minus(V17, V18, Ret03),gcd(Ret03, 1 + V18, Ret4)],[Out = Ret4,V1 = 1 + V18,V = 1,V18 >= 0,V17 >= 0,V14 = 1 + V17]).
eq(pred(V, Out),0,[],[Out = 0,V19 >= 0,V = V19]).
eq(fun(V, V1, V14, Out),0,[],[Out = 0,V20 >= 0,V14 = V21,V22 >= 0,V = V20,V1 = V22,V21 >= 0]).
eq(le(V, V1, Out),0,[],[Out = 0,V23 >= 0,V24 >= 0,V = V23,V1 = V24]).
eq(minus(V, V1, Out),0,[],[Out = 0,V25 >= 0,V26 >= 0,V = V25,V1 = V26]).
eq(gcd(V, V1, Out),0,[],[Out = 0,V27 >= 0,V28 >= 0,V = V27,V1 = V28]).
input_output_vars(le(V,V1,Out),[V,V1],[Out]).
input_output_vars(pred(V,Out),[V],[Out]).
input_output_vars(minus(V,V1,Out),[V,V1],[Out]).
input_output_vars(gcd(V,V1,Out),[V,V1],[Out]).
input_output_vars(fun(V,V1,V14,Out),[V,V1,V14],[Out]).

CoFloCo proof output:
Preprocessing Cost Relations
=====================================

#### Computed strongly connected components
0. recursive : [le/3]
1. non_recursive : [pred/2]
2. recursive [non_tail] : [minus/3]
3. recursive : [fun/4,gcd/3]
4. non_recursive : [start/3]

#### Obtained direct recursion through partial evaluation
0. SCC is partially evaluated into le/3
1. SCC is partially evaluated into pred/2
2. SCC is partially evaluated into minus/3
3. SCC is partially evaluated into gcd/3
4. SCC is partially evaluated into start/3

Control-Flow Refinement of Cost Relations
=====================================

### Specialization of cost equations le/3
* CE 21 is refined into CE [24]
* CE 19 is refined into CE [25]
* CE 18 is refined into CE [26]
* CE 20 is refined into CE [27]


### Cost equations --> "Loop" of le/3
* CEs [27] --> Loop 17
* CEs [24] --> Loop 18
* CEs [25] --> Loop 19
* CEs [26] --> Loop 20

### Ranking functions of CR le(V,V1,Out)
* RF of phase [17]: [V,V1]

#### Partial ranking functions of CR le(V,V1,Out)
* Partial RF of phase [17]:
- RF of loop [17:1]:
V
V1


### Specialization of cost equations pred/2
* CE 22 is refined into CE [28]
* CE 23 is refined into CE [29]


### Cost equations --> "Loop" of pred/2
* CEs [28] --> Loop 21
* CEs [29] --> Loop 22

### Ranking functions of CR pred(V,Out)

#### Partial ranking functions of CR pred(V,Out)


### Specialization of cost equations minus/3
* CE 11 is refined into CE [30]
* CE 9 is refined into CE [31]
* CE 10 is refined into CE [32,33]


### Cost equations --> "Loop" of minus/3
* CEs [33] --> Loop 23
* CEs [32] --> Loop 24
* CEs [30] --> Loop 25
* CEs [31] --> Loop 26

### Ranking functions of CR minus(V,V1,Out)
* RF of phase [23]: [V1]
* RF of phase [24]: [V1]

#### Partial ranking functions of CR minus(V,V1,Out)
* Partial RF of phase [23]:
- RF of loop [23:1]:
V1
* Partial RF of phase [24]:
- RF of loop [24:1]:
V1


### Specialization of cost equations gcd/3
* CE 12 is refined into CE [34,35,36,37,38]
* CE 17 is refined into CE [39]
* CE 16 is refined into CE [40]
* CE 15 is refined into CE [41]
* CE 14 is refined into CE [42,43,44,45]
* CE 13 is refined into CE [46,47,48,49]


### Cost equations --> "Loop" of gcd/3
* CEs [49] --> Loop 27
* CEs [45] --> Loop 28
* CEs [48] --> Loop 29
* CEs [44] --> Loop 30
* CEs [42] --> Loop 31
* CEs [43] --> Loop 32
* CEs [46] --> Loop 33
* CEs [47] --> Loop 34
* CEs [34] --> Loop 35
* CEs [40] --> Loop 36
* CEs [35,36,37,38,39] --> Loop 37
* CEs [41] --> Loop 38

### Ranking functions of CR gcd(V,V1,Out)
* RF of phase [27,28]: [V+V1-3]
* RF of phase [31]: [V]

#### Partial ranking functions of CR gcd(V,V1,Out)
* Partial RF of phase [27,28]:
- RF of loop [27:1]:
V/2+V1/2-2
V1-2
- RF of loop [28:1]:
V-1 depends on loops [27:1]
V-V1+1 depends on loops [27:1]
* Partial RF of phase [31]:
- RF of loop [31:1]:
V


### Specialization of cost equations start/3
* CE 4 is refined into CE [50,51,52,53,54,55,56,57,58,59,60,61]
* CE 2 is refined into CE [62]
* CE 3 is refined into CE [63,64,65,66,67,68,69,70,71,72,73,74]
* CE 5 is refined into CE [75,76,77,78,79]
* CE 6 is refined into CE [80,81]
* CE 7 is refined into CE [82,83,84]
* CE 8 is refined into CE [85,86,87,88,89,90,91,92,93]


### Cost equations --> "Loop" of start/3
* CEs [89,90] --> Loop 39
* CEs [76,82,88] --> Loop 40
* CEs [58] --> Loop 41
* CEs [56] --> Loop 42
* CEs [50,51,52,53,54,55,57,59,60,61] --> Loop 43
* CEs [69] --> Loop 44
* CEs [71,87] --> Loop 45
* CEs [63,64,65,66,67,68,70,72,73,74] --> Loop 46
* CEs [62,75,77,78,79,80,81,83,84,85,86,91,92,93] --> Loop 47

### Ranking functions of CR start(V,V1,V14)

#### Partial ranking functions of CR start(V,V1,V14)


Computing Bounds
=====================================

#### Cost of chains of le(V,V1,Out):
* Chain [[17],20]: 1*it(17)+1
Such that:it(17) =< V

with precondition: [Out=2,V>=1,V1>=V]

* Chain [[17],19]: 1*it(17)+1
Such that:it(17) =< V1

with precondition: [Out=1,V1>=1,V>=V1+1]

* Chain [[17],18]: 1*it(17)+0
Such that:it(17) =< V1

with precondition: [Out=0,V>=1,V1>=1]

* Chain [20]: 1
with precondition: [V=0,Out=2,V1>=0]

* Chain [19]: 1
with precondition: [V1=0,Out=1,V>=1]

* Chain [18]: 0
with precondition: [Out=0,V>=0,V1>=0]


#### Cost of chains of pred(V,Out):
* Chain [22]: 0
with precondition: [Out=0,V>=0]

* Chain [21]: 1
with precondition: [V=Out+1,V>=1]


#### Cost of chains of minus(V,V1,Out):
* Chain [[24],[23],26]: 3*it(23)+1
Such that:aux(1) =< V1
it(23) =< aux(1)

with precondition: [Out=0,V>=1,V1>=2]

* Chain [[24],26]: 1*it(24)+1
Such that:it(24) =< V1

with precondition: [Out=0,V>=0,V1>=1]

* Chain [[24],25]: 1*it(24)+0
Such that:it(24) =< V1

with precondition: [Out=0,V>=0,V1>=1]

* Chain [[23],26]: 2*it(23)+1
Such that:it(23) =< V1

with precondition: [V=Out+V1,V1>=1,V>=V1]

* Chain [26]: 1
with precondition: [V1=0,V=Out,V>=0]

* Chain [25]: 0
with precondition: [Out=0,V>=0,V1>=0]


#### Cost of chains of gcd(V,V1,Out):
* Chain [[31],38]: 4*it(31)+1
Such that:it(31) =< V

with precondition: [V1=1,Out=1,V>=1]

* Chain [[31],37]: 6*it(31)+1*s(8)+2
Such that:s(8) =< 1
aux(4) =< V
it(31) =< aux(4)

with precondition: [V1=1,Out=0,V>=1]

* Chain [[31],35]: 4*it(31)+2
Such that:it(31) =< V

with precondition: [V1=1,Out=0,V>=2]

* Chain [[31],32,38]: 4*it(31)+5
Such that:it(31) =< V

with precondition: [V1=1,Out=1,V>=2]

* Chain [[31],32,37]: 4*it(31)+1*s(8)+6
Such that:s(8) =< 1
it(31) =< V

with precondition: [V1=1,Out=0,V>=2]

* Chain [[27,28],38]: 4*it(27)+4*it(28)+3*s(19)+3*s(21)+1
Such that:aux(10) =< V-V1+1
aux(22) =< V+V1
aux(23) =< V+V1-Out
it(27) =< V/2+V1/2
aux(25) =< V/2+V1/2-Out/2
aux(26) =< V1
aux(27) =< V1-Out
aux(9) =< 2*V1-2*Out
aux(28) =< V
it(27) =< aux(22)
it(28) =< aux(22)
s(20) =< aux(22)
it(27) =< aux(23)
it(28) =< aux(23)
s(20) =< aux(23)
it(27) =< aux(25)
it(28) =< aux(25)
aux(7) =< aux(26)
it(27) =< aux(26)
aux(7) =< aux(27)
it(27) =< aux(27)
it(28) =< aux(9)+aux(10)
it(28) =< aux(7)+aux(28)
s(22) =< aux(7)+aux(28)
s(22) =< it(28)*aux(26)
s(21) =< s(22)
s(19) =< s(20)

with precondition: [Out>=2,V>=Out,V1>=Out]

* Chain [[27,28],37]: 4*it(27)+4*it(28)+6*s(6)+3*s(21)+2
Such that:aux(10) =< V-V1+1
it(27) =< V/2+V1/2
aux(9) =< 2*V1
aux(29) =< V
aux(30) =< V+V1
aux(31) =< V1
s(6) =< aux(30)
it(27) =< aux(30)
it(28) =< aux(30)
it(27) =< aux(31)
it(28) =< aux(9)+aux(10)
it(28) =< aux(31)+aux(29)
s(22) =< aux(31)+aux(29)
s(22) =< it(28)*aux(31)
s(21) =< s(22)

with precondition: [Out=0,V>=2,V1>=2]

* Chain [[27,28],34,38]: 4*it(27)+4*it(28)+3*s(19)+3*s(21)+5
Such that:aux(10) =< V-V1+1
aux(9) =< 2*V1
aux(32) =< V
aux(33) =< V+V1
aux(34) =< V/2+V1/2
aux(35) =< V1
it(27) =< aux(34)
it(27) =< aux(33)
it(28) =< aux(33)
it(28) =< aux(34)
it(27) =< aux(35)
it(28) =< aux(9)+aux(10)
it(28) =< aux(35)+aux(32)
s(22) =< aux(35)+aux(32)
s(22) =< it(28)*aux(35)
s(21) =< s(22)
s(19) =< aux(33)

with precondition: [Out=1,V>=2,V1>=2,V+V1>=5]

* Chain [[27,28],34,37]: 4*it(27)+4*it(28)+1*s(8)+3*s(19)+3*s(21)+6
Such that:s(8) =< 1
aux(10) =< V-V1+1
aux(9) =< 2*V1
aux(36) =< V
aux(37) =< V+V1
aux(38) =< V/2+V1/2
aux(39) =< V1
it(27) =< aux(38)
it(27) =< aux(37)
it(28) =< aux(37)
it(28) =< aux(38)
it(27) =< aux(39)
it(28) =< aux(9)+aux(10)
it(28) =< aux(39)+aux(36)
s(22) =< aux(39)+aux(36)
s(22) =< it(28)*aux(39)
s(21) =< s(22)
s(19) =< aux(37)

with precondition: [Out=0,V>=2,V1>=2,V+V1>=5]

* Chain [[27,28],33,[31],38]: 4*it(27)+4*it(28)+4*it(31)+3*s(19)+3*s(21)+5
Such that:aux(10) =< V-V1+1
it(27) =< V/2+V1/2
aux(9) =< 2*V1
aux(40) =< V
aux(41) =< V+V1
aux(42) =< V1
it(31) =< aux(42)
it(27) =< aux(41)
it(28) =< aux(41)
it(27) =< aux(42)
it(28) =< aux(9)+aux(10)
it(28) =< aux(42)+aux(40)
s(22) =< aux(42)+aux(40)
s(22) =< it(28)*aux(42)
s(21) =< s(22)
s(19) =< aux(41)

with precondition: [Out=1,V>=2,V1>=2,V+V1>=5]

* Chain [[27,28],33,[31],37]: 4*it(27)+4*it(28)+6*it(31)+1*s(8)+3*s(19)+3*s(21)+6
Such that:s(8) =< 1
aux(10) =< V-V1+1
it(27) =< V/2+V1/2
aux(43) =< V
aux(44) =< V+V1
aux(45) =< V1
aux(46) =< 2*V1
it(31) =< aux(46)
it(27) =< aux(44)
it(28) =< aux(44)
it(27) =< aux(45)
it(28) =< aux(46)+aux(10)
it(28) =< aux(45)+aux(43)
s(22) =< aux(45)+aux(43)
s(22) =< it(28)*aux(45)
s(21) =< s(22)
s(19) =< aux(44)

with precondition: [Out=0,V>=2,V1>=2,V+V1>=5]

* Chain [[27,28],33,[31],35]: 4*it(27)+4*it(28)+4*it(31)+3*s(19)+3*s(21)+6
Such that:aux(10) =< V-V1+1
it(27) =< V/2+V1/2
aux(9) =< 2*V1
aux(47) =< V
aux(48) =< V+V1
aux(49) =< V1
it(31) =< aux(49)
it(27) =< aux(48)
it(28) =< aux(48)
it(27) =< aux(49)
it(28) =< aux(9)+aux(10)
it(28) =< aux(49)+aux(47)
s(22) =< aux(49)+aux(47)
s(22) =< it(28)*aux(49)
s(21) =< s(22)
s(19) =< aux(48)

with precondition: [Out=0,V>=3,V1>=3,V+V1>=7]

* Chain [[27,28],33,[31],32,38]: 4*it(27)+4*it(28)+4*it(31)+3*s(19)+3*s(21)+9
Such that:aux(10) =< V-V1+1
it(27) =< V/2+V1/2
aux(9) =< 2*V1
aux(50) =< V
aux(51) =< V+V1
aux(52) =< V1
it(31) =< aux(52)
it(27) =< aux(51)
it(28) =< aux(51)
it(27) =< aux(52)
it(28) =< aux(9)+aux(10)
it(28) =< aux(52)+aux(50)
s(22) =< aux(52)+aux(50)
s(22) =< it(28)*aux(52)
s(21) =< s(22)
s(19) =< aux(51)

with precondition: [Out=1,V>=3,V1>=3,V+V1>=7]

* Chain [[27,28],33,[31],32,37]: 4*it(27)+4*it(28)+4*it(31)+1*s(8)+3*s(19)+3*s(21)+10
Such that:s(8) =< 1
aux(10) =< V-V1+1
it(27) =< V/2+V1/2
aux(9) =< 2*V1
aux(53) =< V
aux(54) =< V+V1
aux(55) =< V1
it(31) =< aux(55)
it(27) =< aux(54)
it(28) =< aux(54)
it(27) =< aux(55)
it(28) =< aux(9)+aux(10)
it(28) =< aux(55)+aux(53)
s(22) =< aux(55)+aux(53)
s(22) =< it(28)*aux(55)
s(21) =< s(22)
s(19) =< aux(54)

with precondition: [Out=0,V>=3,V1>=3,V+V1>=7]

* Chain [[27,28],33,37]: 4*it(27)+4*it(28)+2*s(6)+1*s(8)+3*s(19)+3*s(21)+6
Such that:s(8) =< 1
aux(10) =< V-V1+1
it(27) =< V/2+V1/2
aux(56) =< V
aux(57) =< V+V1
aux(58) =< V1
aux(59) =< 2*V1
s(6) =< aux(59)
it(27) =< aux(57)
it(28) =< aux(57)
it(27) =< aux(58)
it(28) =< aux(59)+aux(10)
it(28) =< aux(58)+aux(56)
s(22) =< aux(58)+aux(56)
s(22) =< it(28)*aux(58)
s(21) =< s(22)
s(19) =< aux(57)

with precondition: [Out=0,V>=2,V1>=2,V+V1>=5]

* Chain [[27,28],33,35]: 4*it(27)+4*it(28)+3*s(19)+3*s(21)+6
Such that:aux(10) =< V-V1+1
aux(9) =< 2*V1
aux(60) =< V
aux(61) =< V+V1
aux(62) =< V/2+V1/2
aux(63) =< V1
it(27) =< aux(62)
it(27) =< aux(61)
it(28) =< aux(61)
it(28) =< aux(62)
it(27) =< aux(63)
it(28) =< aux(9)+aux(10)
it(28) =< aux(63)+aux(60)
s(22) =< aux(63)+aux(60)
s(22) =< it(28)*aux(63)
s(21) =< s(22)
s(19) =< aux(61)

with precondition: [Out=0,V>=2,V1>=2,V+V1>=5]

* Chain [[27,28],33,32,38]: 4*it(27)+4*it(28)+3*s(19)+3*s(21)+9
Such that:aux(10) =< V-V1+1
aux(9) =< 2*V1
aux(64) =< V
aux(65) =< V+V1
aux(66) =< V/2+V1/2
aux(67) =< V1
it(27) =< aux(66)
it(27) =< aux(65)
it(28) =< aux(65)
it(28) =< aux(66)
it(27) =< aux(67)
it(28) =< aux(9)+aux(10)
it(28) =< aux(67)+aux(64)
s(22) =< aux(67)+aux(64)
s(22) =< it(28)*aux(67)
s(21) =< s(22)
s(19) =< aux(65)

with precondition: [Out=1,V>=2,V1>=2,V+V1>=5]

* Chain [[27,28],33,32,37]: 4*it(27)+4*it(28)+1*s(8)+3*s(19)+3*s(21)+10
Such that:s(8) =< 1
aux(10) =< V-V1+1
aux(9) =< 2*V1
aux(68) =< V
aux(69) =< V+V1
aux(70) =< V/2+V1/2
aux(71) =< V1
it(27) =< aux(70)
it(27) =< aux(69)
it(28) =< aux(69)
it(28) =< aux(70)
it(27) =< aux(71)
it(28) =< aux(9)+aux(10)
it(28) =< aux(71)+aux(68)
s(22) =< aux(71)+aux(68)
s(22) =< it(28)*aux(71)
s(21) =< s(22)
s(19) =< aux(69)

with precondition: [Out=0,V>=2,V1>=2,V+V1>=5]

* Chain [[27,28],30,38]: 4*it(27)+4*it(28)+3*s(19)+3*s(21)+6*s(25)+5
Such that:aux(21) =< V
aux(10) =< V-V1+1
aux(22) =< V+V1
aux(23) =< V+V1-2*Out
aux(24) =< V-Out
it(27) =< V/2+V1/2
aux(25) =< V/2+V1/2-Out
aux(26) =< V1
aux(27) =< V1-Out
aux(9) =< 2*V1-2*Out
aux(72) =< Out
s(25) =< aux(72)
it(27) =< aux(22)
it(28) =< aux(22)
s(20) =< aux(22)
it(27) =< aux(23)
it(28) =< aux(23)
s(20) =< aux(23)
it(27) =< aux(25)
it(28) =< aux(25)
aux(7) =< aux(26)
it(27) =< aux(26)
aux(7) =< aux(27)
it(27) =< aux(27)
it(28) =< aux(9)+aux(10)
it(28) =< aux(7)+aux(21)
s(22) =< aux(7)+aux(24)
s(22) =< aux(7)+aux(21)
it(28) =< aux(7)+aux(24)
s(22) =< it(28)*aux(26)
s(21) =< s(22)
s(19) =< s(20)

with precondition: [Out>=2,V>=Out,V1>=Out,V+V1>=3*Out]

* Chain [[27,28],30,37]: 4*it(27)+4*it(28)+7*s(8)+3*s(19)+3*s(21)+6
Such that:aux(10) =< V-V1+1
aux(9) =< 2*V1
aux(74) =< V
aux(75) =< V+V1
aux(76) =< V/2+V1/2
aux(77) =< V1
it(27) =< aux(76)
s(8) =< aux(77)
it(27) =< aux(75)
it(28) =< aux(75)
it(28) =< aux(76)
it(27) =< aux(77)
it(28) =< aux(9)+aux(10)
it(28) =< aux(77)+aux(74)
s(22) =< aux(77)+aux(74)
s(22) =< it(28)*aux(77)
s(21) =< s(22)
s(19) =< aux(75)

with precondition: [Out=0,V>=2,V1>=2,V+V1>=6]

* Chain [[27,28],29,38]: 4*it(27)+4*it(28)+3*s(19)+3*s(21)+6*s(28)+5
Such that:aux(21) =< V
aux(10) =< V-V1+1
aux(22) =< V+V1
aux(23) =< V+V1-2*Out
aux(24) =< V-Out
it(27) =< V/2+V1/2
aux(25) =< V/2+V1/2-Out
aux(26) =< V1
aux(27) =< V1-Out
aux(9) =< 2*V1-2*Out
aux(78) =< Out
s(28) =< aux(78)
it(27) =< aux(22)
it(28) =< aux(22)
s(20) =< aux(22)
it(27) =< aux(23)
it(28) =< aux(23)
s(20) =< aux(23)
it(27) =< aux(25)
it(28) =< aux(25)
aux(7) =< aux(26)
it(27) =< aux(26)
aux(7) =< aux(27)
it(27) =< aux(27)
it(28) =< aux(9)+aux(10)
it(28) =< aux(7)+aux(21)
s(22) =< aux(7)+aux(24)
s(22) =< aux(7)+aux(21)
it(28) =< aux(7)+aux(24)
s(22) =< it(28)*aux(26)
s(21) =< s(22)
s(19) =< s(20)

with precondition: [Out>=2,V>=Out+1,V1>=Out+1,V+V1>=3*Out+2]

* Chain [[27,28],29,37]: 4*it(27)+4*it(28)+7*s(8)+3*s(19)+3*s(21)+6
Such that:aux(10) =< V-V1+1
aux(9) =< 2*V1
aux(80) =< V
aux(81) =< V+V1
aux(82) =< V/2+V1/2
aux(83) =< V1
it(27) =< aux(82)
s(8) =< aux(80)
it(27) =< aux(81)
it(28) =< aux(81)
it(28) =< aux(82)
it(27) =< aux(83)
it(28) =< aux(9)+aux(10)
it(28) =< aux(83)+aux(80)
s(22) =< aux(83)+aux(80)
s(22) =< it(28)*aux(83)
s(21) =< s(22)
s(19) =< aux(81)

with precondition: [Out=0,V>=3,V1>=3,V+V1>=8]

* Chain [38]: 1
with precondition: [V=0,V1=Out,V1>=0]

* Chain [37]: 2*s(6)+1*s(8)+2
Such that:s(8) =< V1
aux(3) =< V
s(6) =< aux(3)

with precondition: [Out=0,V>=0,V1>=0]

* Chain [36]: 1
with precondition: [V1=0,V=Out,V>=1]

* Chain [35]: 2
with precondition: [V1=1,Out=0,V>=1]

* Chain [34,38]: 5
with precondition: [V=1,Out=1,V1>=2]

* Chain [34,37]: 1*s(8)+6
Such that:s(8) =< 1

with precondition: [V=1,Out=0,V1>=2]

* Chain [33,[31],38]: 4*it(31)+5
Such that:it(31) =< V1

with precondition: [V=1,Out=1,V1>=2]

* Chain [33,[31],37]: 6*it(31)+1*s(8)+6
Such that:s(8) =< 1
aux(4) =< V1
it(31) =< aux(4)

with precondition: [V=1,Out=0,V1>=2]

* Chain [33,[31],35]: 4*it(31)+6
Such that:it(31) =< V1

with precondition: [V=1,Out=0,V1>=3]

* Chain [33,[31],32,38]: 4*it(31)+9
Such that:it(31) =< V1

with precondition: [V=1,Out=1,V1>=3]

* Chain [33,[31],32,37]: 4*it(31)+1*s(8)+10
Such that:s(8) =< 1
it(31) =< V1

with precondition: [V=1,Out=0,V1>=3]

* Chain [33,37]: 2*s(6)+1*s(8)+6
Such that:s(8) =< 1
aux(3) =< V1
s(6) =< aux(3)

with precondition: [V=1,Out=0,V1>=2]

* Chain [33,35]: 6
with precondition: [V=1,Out=0,V1>=2]

* Chain [33,32,38]: 9
with precondition: [V=1,Out=1,V1>=2]

* Chain [33,32,37]: 1*s(8)+10
Such that:s(8) =< 1

with precondition: [V=1,Out=0,V1>=2]

* Chain [32,38]: 5
with precondition: [V1=1,Out=1,V>=1]

* Chain [32,37]: 1*s(8)+6
Such that:s(8) =< 1

with precondition: [V1=1,Out=0,V>=1]

* Chain [30,38]: 6*s(25)+5
Such that:aux(72) =< Out
s(25) =< aux(72)

with precondition: [V1=Out,V1>=2,V>=V1]

* Chain [30,37]: 7*s(8)+6
Such that:aux(73) =< V1
s(8) =< aux(73)

with precondition: [Out=0,V1>=2,V>=V1]

* Chain [29,38]: 6*s(28)+5
Such that:aux(78) =< Out
s(28) =< aux(78)

with precondition: [V=Out,V>=2,V1>=V+1]

* Chain [29,37]: 7*s(8)+6
Such that:aux(79) =< V
s(8) =< aux(79)

with precondition: [Out=0,V>=2,V1>=V+1]


#### Cost of chains of start(V,V1,V14):
* Chain [47]: 62*s(273)+17*s(275)+10*s(286)+68*s(287)+36*s(289)+27*s(291)+72*s(292)+8*s(293)+32*s(294)+24*s(296)+10
Such that:s(279) =< 1
aux(116) =< V
aux(117) =< V-V1+1
aux(118) =< V+V1
aux(119) =< V/2+V1/2
aux(120) =< V1
aux(121) =< 2*V1
s(275) =< aux(116)
s(273) =< aux(120)
s(286) =< s(279)
s(287) =< aux(119)
s(287) =< aux(118)
s(289) =< aux(118)
s(289) =< aux(119)
s(287) =< aux(120)
s(289) =< aux(121)+aux(117)
s(289) =< aux(120)+aux(116)
s(290) =< aux(120)+aux(116)
s(290) =< s(289)*aux(120)
s(291) =< s(290)
s(292) =< aux(118)
s(293) =< aux(121)
s(294) =< aux(118)
s(294) =< aux(121)+aux(117)
s(294) =< aux(120)+aux(116)
s(295) =< aux(120)+aux(116)
s(295) =< s(294)*aux(120)
s(296) =< s(295)

with precondition: [V>=0]

* Chain [46]: 72*s(349)+40*s(350)+20*s(352)+15*s(354)+143*s(355)+8*s(356)+20*s(357)+15*s(359)+143*s(368)+40*s(379)+20*s(381)+15*s(383)+16*s(385)+20*s(386)+15*s(388)+68*s(399)+36*s(401)+27*s(403)+32*s(406)+24*s(408)+16*s(409)+12
Such that:s(348) =< 2
s(373) =< -V1+1
s(375) =< V1/2
aux(132) =< 1
aux(133) =< -2*V1+V14+1
aux(134) =< -V1+V14
aux(135) =< V1
aux(136) =< 2*V1
aux(137) =< V14
aux(138) =< V14/2
s(349) =< aux(132)
s(355) =< aux(137)
s(379) =< s(375)
s(368) =< aux(135)
s(379) =< aux(135)
s(381) =< aux(135)
s(381) =< s(375)
s(381) =< aux(136)+s(373)
s(382) =< aux(135)
s(382) =< s(381)*aux(135)
s(383) =< s(382)
s(385) =< aux(136)
s(386) =< aux(135)
s(386) =< aux(136)+s(373)
s(387) =< aux(135)
s(387) =< s(386)*aux(135)
s(388) =< s(387)
s(399) =< aux(138)
s(399) =< aux(137)
s(401) =< aux(137)
s(401) =< aux(138)
s(399) =< aux(135)
s(401) =< aux(136)+aux(133)
s(401) =< aux(135)+aux(134)
s(402) =< aux(135)+aux(134)
s(402) =< s(401)*aux(135)
s(403) =< s(402)
s(406) =< aux(137)
s(406) =< aux(136)+aux(133)
s(406) =< aux(135)+aux(134)
s(407) =< aux(135)+aux(134)
s(407) =< s(406)*aux(135)
s(408) =< s(407)
s(409) =< aux(134)
s(350) =< aux(138)
s(350) =< aux(137)
s(352) =< aux(137)
s(352) =< aux(138)
s(350) =< aux(132)
s(352) =< s(348)+aux(137)
s(352) =< aux(132)+aux(137)
s(353) =< aux(132)+aux(137)
s(353) =< s(352)*aux(132)
s(354) =< s(353)
s(356) =< s(348)
s(357) =< aux(137)
s(357) =< s(348)+aux(137)
s(357) =< aux(132)+aux(137)
s(358) =< aux(132)+aux(137)
s(358) =< s(357)*aux(132)
s(359) =< s(358)

with precondition: [V=1,V1>=1,V14>=1]

* Chain [45]: 10*s(457)+8*s(461)+11
Such that:s(460) =< V1
aux(139) =< V14
s(461) =< s(460)
s(457) =< aux(139)

with precondition: [V=1,V1>=2]

* Chain [44]: 2*s(462)+3
Such that:s(462) =< V14

with precondition: [V=1,V1=V14,V1>=2]

* Chain [43]: 72*s(470)+40*s(471)+20*s(473)+15*s(475)+143*s(476)+8*s(477)+20*s(478)+15*s(480)+143*s(489)+40*s(500)+20*s(502)+15*s(504)+16*s(506)+20*s(507)+15*s(509)+68*s(520)+36*s(522)+27*s(524)+32*s(527)+24*s(529)+16*s(530)+12
Such that:s(469) =< 2
s(494) =< -V14+1
s(496) =< V14/2
aux(150) =< 1
aux(151) =< V1
aux(152) =< V1-2*V14+1
aux(153) =< V1-V14
aux(154) =< V1/2
aux(155) =< V14
aux(156) =< 2*V14
s(470) =< aux(150)
s(476) =< aux(151)
s(500) =< s(496)
s(489) =< aux(155)
s(500) =< aux(155)
s(502) =< aux(155)
s(502) =< s(496)
s(502) =< aux(156)+s(494)
s(503) =< aux(155)
s(503) =< s(502)*aux(155)
s(504) =< s(503)
s(506) =< aux(156)
s(507) =< aux(155)
s(507) =< aux(156)+s(494)
s(508) =< aux(155)
s(508) =< s(507)*aux(155)
s(509) =< s(508)
s(520) =< aux(154)
s(520) =< aux(151)
s(522) =< aux(151)
s(522) =< aux(154)
s(520) =< aux(155)
s(522) =< aux(156)+aux(152)
s(522) =< aux(155)+aux(153)
s(523) =< aux(155)+aux(153)
s(523) =< s(522)*aux(155)
s(524) =< s(523)
s(527) =< aux(151)
s(527) =< aux(156)+aux(152)
s(527) =< aux(155)+aux(153)
s(528) =< aux(155)+aux(153)
s(528) =< s(527)*aux(155)
s(529) =< s(528)
s(530) =< aux(153)
s(471) =< aux(154)
s(471) =< aux(151)
s(473) =< aux(151)
s(473) =< aux(154)
s(471) =< aux(150)
s(473) =< s(469)+aux(151)
s(473) =< aux(150)+aux(151)
s(474) =< aux(150)+aux(151)
s(474) =< s(473)*aux(150)
s(475) =< s(474)
s(477) =< s(469)
s(478) =< aux(151)
s(478) =< s(469)+aux(151)
s(478) =< aux(150)+aux(151)
s(479) =< aux(150)+aux(151)
s(479) =< s(478)*aux(150)
s(480) =< s(479)

with precondition: [V=2,V1>=1,V14>=1]

* Chain [42]: 2*s(578)+3
Such that:s(578) =< V14

with precondition: [V=2,V1=V14,V1>=2]

* Chain [41]: 10*s(579)+11
Such that:aux(157) =< V14
s(579) =< aux(157)

with precondition: [V=2,V1=V14+1,V1>=3]

* Chain [40]: 1
with precondition: [V1=0,V>=0]

* Chain [39]: 3*s(584)+22*s(585)+6
Such that:s(582) =< 1
aux(158) =< V
s(584) =< s(582)
s(585) =< aux(158)

with precondition: [V1=1,V>=1]


Closed-form bounds of start(V,V1,V14):
-------------------------------------
* Chain [47] with precondition: [V>=0]
- Upper bound: 68*V+20+nat(V1)*113+nat(2*V1)*8+nat(V+V1)*140+nat(V/2+V1/2)*68
- Complexity: n
* Chain [46] with precondition: [V=1,V1>=1,V14>=1]
- Upper bound: 296*V1+281*V14+170+nat(-V1+V14)*67+20*V1+34*V14
- Complexity: n
* Chain [45] with precondition: [V=1,V1>=2]
- Upper bound: 8*V1+11+nat(V14)*10
- Complexity: n
* Chain [44] with precondition: [V=1,V1=V14,V1>=2]
- Upper bound: 2*V14+3
- Complexity: n
* Chain [43] with precondition: [V=2,V1>=1,V14>=1]
- Upper bound: 281*V1+296*V14+170+nat(V1-V14)*67+34*V1+20*V14
- Complexity: n
* Chain [42] with precondition: [V=2,V1=V14,V1>=2]
- Upper bound: 2*V14+3
- Complexity: n
* Chain [41] with precondition: [V=2,V1=V14+1,V1>=3]
- Upper bound: 10*V14+11
- Complexity: n
* Chain [40] with precondition: [V1=0,V>=0]
- Upper bound: 1
- Complexity: constant
* Chain [39] with precondition: [V1=1,V>=1]
- Upper bound: 22*V+9
- Complexity: n

### Maximum cost of start(V,V1,V14): max([46*V+11+nat(V1)*113+nat(2*V1)*8+nat(V+V1)*140+nat(V/2+V1/2)*68+ (22*V+8),nat(V1)*256+159+nat(V14)*254+nat(V1/2)*40+nat(V14/2)*40+max([nat(2*V1)*16+nat(V14)*17+nat(-V1+V14)*67+nat(V14/2)*28,nat(2*V14)*16+nat(V1)*17+nat(V1-V14)*67+nat(V1/2)*28])+nat(V1)*8+ (nat(V14)*8+8)+ (nat(V14)*2+2)])+1
Asymptotic class: n
* Total analysis performed in 1376 ms.

(10) BOUNDS(1, n^1)